When a user selects an HTML element in a Dreamweaver document and opens the Behavior inspector, the following chain of events occurs:
1 | The user clicks the + button to display the Actions pop-up menu. |
2 | Dreamweaver calls the canAcceptBehavior() function in each action file to see whether this action is appropriate for the document or the selected element. If the return value of this function is FALSE , Dreamweaver dims the action in the Actions pop-up menu. (For example, the Control Shockwave action is dimmed when the user's document has no Shockwave movies.) If the return value is a list of events, Dreamweaver compares each event with the valid events for the currently selected HTML element and target browser until it finds a match. |
3 | Dreamweaver populates the Events pop-up menu with the matched event from canAcceptBehavior() at the top of the list; if no match exists, the default event for the HTML element (marked in the event file with an asterisk) becomes the top item. The remaining events in the menu are culled from the event file. |
4 | The user selects an action from the Action pop-up menu. |
5 | Dreamweaver calls the windowDimensions() function, if defined, to determine the size of the parameters dialog box. If windowDimensions() is not defined, the size is determined automatically. |
6 | Dreamweaver displays a dialog box containing the BODY elements of the action file. If the action file's BODY tag contains an onLoad handler, Dreamweaver executes it. |
7 | The user fills in the parameters for the action. Dreamweaver executes event handlers associated with the form as the user encounters them. |
8 | The user clicks OK. |
9 | Dreamweaver calls the behaviorFunction() and applyBehavior() functions in the selected action file. These functions return strings that are inserted into the user's document. |
10 | If the user later double-clicks the action in the Actions column, Dreamweaver reopens the parameters dialog box, executing the onLoad handler. Dreamweaver then calls the inspectBehavior() function in the selected action file, which fills in the fields with the data that the user entered previously. |
![]() |